﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/SiteMain.Master" AutoEventWireup="true"
    CodeBehind="TvShows.aspx.cs" Inherits="MyOrganizer.Pages.TvShows" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#liTvShows').addClass('current');
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdPnlMain" runat="server">
        <ContentTemplate>
            <p style="text-align: right">
                <asp:LinkButton ID="lnkAdd" runat="server" OnClick="lnkAdd_Click">Add TvShow</asp:LinkButton>
            </p>
            <asp:Repeater ID="rptData" runat="server" OnItemCommand="rptData_ItemCommand">
                <HeaderTemplate>
                    <table style="width: 100%; border-spacing: 0;">
                        <tr>
                            <th>
                                TvShowId
                            </th>
                            <th>
                                Name
                            </th>
                            <th>
                                Ep. Number
                            </th>
                            <th>
                                Season Number
                            </th>
                            <th>
                                Last Viewed Episode
                            </th>
                            <th>
                                Release Day
                            </th>
                            <th>
                                Score
                            </th>
                            <th>
                                Edit
                            </th>
                            <th>
                                Delete
                            </th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <%# Eval("TvShowId")%>
                        </td>
                        <td>
                            <%# Eval("Name")%>
                        </td>
                        <td>
                            <%# Eval("EpisodeNumber")%>
                        </td>
                        <td>
                            <%# Eval("SeasonNumber")%>
                        </td>
                        <td>
                            <%# Eval("LastViewedEpisode")%>
                        </td>
                        <td>
                            <%# Eval("ReleaseDay")%>
                        </td>
                        <td>
                            <%# Eval("Score")%>
                        </td>
                        <td>
                            <asp:LinkButton ID="lnkButtonEdit" runat="server" CommandName="Edit" CommandArgument='<%# Eval("TvShowId")%>'
                                Text="Edit" />
                        </td>
                        <td>
                            <asp:LinkButton ID="lbkButtonDelete" runat="server" CommandName="Delete" CommandArgument='<%# Eval("TvShowId")%>'
                                Text="Delete" />
                        </td>
                    </tr>
                </ItemTemplate>
                <AlternatingItemTemplate>
                    <tr>
                        <td>
                            <%# Eval("TvShowId")%>
                        </td>
                        <td>
                            <%# Eval("Name")%>
                        </td>
                        <td>
                            <%# Eval("EpisodeNumber")%>
                        </td>
                        <td>
                            <%# Eval("SeasonNumber")%>
                        </td>
                        <td>
                            <%# Eval("LastViewedEpisode")%>
                        </td>
                        <td>
                            <%# Eval("ReleaseDay")%>
                        </td>
                        <td>
                            <%# Eval("Score")%>
                        </td>
                        <td>
                            <asp:LinkButton ID="lnkButtonEdit" runat="server" CommandName="Edit" CommandArgument='<%# Eval("TvShowId")%>'
                                Text="Edit" />
                        </td>
                        <td>
                            <asp:LinkButton ID="lbkButtonDelete" runat="server" CommandName="Delete" CommandArgument='<%# Eval("TvShowId")%>'
                                Text="Delete" />
                        </td>
                    </tr>
                </AlternatingItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdPnlDetails" runat="server">
        <ContentTemplate>
            <ajaxToolkit:ModalPopupExtender ID="mdlPopUp" runat="server" TargetControlID="btnShowPopUp"
                PopupControlID="pnlPopUp" BackgroundCssClass="modalBackground">
            </ajaxToolkit:ModalPopupExtender>
            <asp:LinkButton ID="btnShowPopUp" runat="server" Visible="true"></asp:LinkButton>
            <asp:Panel ID="pnlPopUp" runat="server" CssClass="registerModal">
                <h2>
                    TvShow Details
                </h2>
                <div class="form_settings">
                    <p>
                        <span>TvShow Id</span>
                        <asp:TextBox ID="txtId" runat="server" ReadOnly="true" Width="200px"></asp:TextBox>
                    </p>
                    <p>
                        <span>Name</span>
                        <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
                    </p>
                    <p>
                        <span>Episode Number</span>
                        <asp:TextBox ID="txtEpisode" runat="server" Width="200px"></asp:TextBox>
                    </p>
                    <p>
                        <span>Season Number</span>
                        <asp:TextBox ID="txtSeason" runat="server" Width="200px"></asp:TextBox>
                    </p>
                    <p>
                        <span>Last Viewed Episode</span>
                        <asp:TextBox ID="txtLast" runat="server" Width="200px"></asp:TextBox>
                    </p>
                    <p>
                        <span>Release Day</span>
                        <asp:DropDownList ID="ddlReleaseDay" runat="server">
                            <asp:ListItem>Monday</asp:ListItem>
                            <asp:ListItem>Tuesday</asp:ListItem>
                            <asp:ListItem>Wednesday</asp:ListItem>
                            <asp:ListItem>Thursday</asp:ListItem>
                            <asp:ListItem>Friday</asp:ListItem>
                            <asp:ListItem>Saturday</asp:ListItem>
                            <asp:ListItem>Sunday</asp:ListItem>
                        </asp:DropDownList>
                    </p>
                    <p>
                        <span>Score</span>
                        <asp:TextBox ID="txtScore" runat="server" Width="200px"></asp:TextBox>
                    </p>
                    <p style="text-align: right">
                        <asp:LinkButton ID="lnkSave" runat="server" OnClick="lnkSave_Click">Save</asp:LinkButton>
                        <asp:LinkButton ID="lnkClose" runat="server">Close</asp:LinkButton>
                    </p>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
